﻿using System.Windows;
using System.Windows.Controls;
using Fluent;
using System.IO.Packaging;
using System.IO;
using System.Windows.Xps.Packaging;
using System.Windows.Xps;
using SGTv2.Templates;

namespace SGTv2
{
    /// <summary>
    /// Description for RemitoEntradaDepositoView.
    /// </summary>
    public partial class NuevoRemitoView : RibbonWindow
    {
        /// <summary>
        /// Initializes a new instance of the RemitoEntradaDepositoView class.
        /// </summary>
        public NuevoRemitoView()
        {
            InitializeComponent();
        }
   

        private void Button_Click(object sender, RoutedEventArgs e)
        {
           /* Package pckg = Package.Open(@"c:\x.xps", FileMode.Create);
            XpsDocument xpsDoc = new XpsDocument(pckg);
            XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
            xpsWriter.Write(this.interno);
            xpsDoc.Close();
            pckg.Close();*/
            RemitoTemplate r = new RemitoTemplate(this.textBox3.Text, this.textBox4.Text, this.textBox6.Text);
            r.Show();
            PrintDialog dialog = new PrintDialog();
            if (dialog.ShowDialog() == true)
            {
                
                dialog.PrintVisual(r.border1, "");
                r.Hide();
                
            }
        }
    }
}